﻿<Page xmlns:Common="using:Coding4Fun.Toolkit.Test.WindowsStore.Common" 
    x:Class="Coding4Fun.Toolkit.Test.WindowsStore.Samples.Slider"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:c4f="using:Coding4Fun.Toolkit.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Coding4Fun.Toolkit.Test.WindowsStore.Samples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Common:BaseHeader Title="Slider"/>
        
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <StackPanel Margin="20, 0">
                <c4f:SuperSlider 
					x:Name="ResultSlider"
					Title="Base Slider"
					Value="2"
					ValueChanged="ResultSlider_ValueChanged"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <StackPanel 
						Grid.Column="0" 
						Orientation="Horizontal">
                        <TextBlock Margin="12, 0">Via Binding:</TextBlock>
                        <TextBlock Text="{Binding ElementName=ResultSlider, Path=Value}" />
                    </StackPanel>

                    <StackPanel 
						Grid.Column="1" 
						Orientation="Horizontal">
                        <TextBlock Margin="12, 0">Via Event:</TextBlock>
                        <TextBlock x:Name="SliderResult" />
                    </StackPanel>
                </Grid>
                <c4f:SuperSlider 
					x:Name="ResultWithStepSlider"
					Title="Base Slider With Step"
					Value="2"
					StepFrequency="1"
					Margin="0,24,0,0"
					ValueChanged="ResultWithStepSlider_ValueChanged"/>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <StackPanel 
					Grid.Column="0" 
					Orientation="Horizontal">
                        <TextBlock Margin="12, 0">Via Binding:</TextBlock>
                        <TextBlock Text="{Binding ElementName=ResultWithStepSlider, Path=Value}" />
                    </StackPanel>

                    <StackPanel 
					Grid.Column="1" 
					Orientation="Horizontal">
                        <TextBlock Margin="12, 0">Via Event:</TextBlock>
                        <TextBlock x:Name="SliderWithStepResult" />
                    </StackPanel>
                </Grid>
                <c4f:SuperSlider 
					Title="Slider with steps"
					Value="10"
					StepFrequency="1"
					Minimum="5"
					Maximum="15" />
                <c4f:SuperSlider 
					Title="Slider with thumb, custom sizing and &quot;flair&quot;"
					BackgroundSize="12"
					ProgressSize="24"
					Value="5"
					Background="CornflowerBlue">
                    <c4f:SuperSlider.Foreground>
                        <LinearGradientBrush EndPoint="1,0">
                            <GradientStop Offset="0.00" Color="#ffff0000"/>
                            <GradientStop Offset="0.166666" Color="#ffffff00"/>
                            <GradientStop Offset="0.333333" Color="#ff00ff00"/>
                            <GradientStop Offset="0.50" Color="#ff00ffff"/>
                            <GradientStop Offset="0.666666" Color="#ff0000ff"/>
                            <GradientStop Offset="0.833333" Color="#ffff00ff"/>
                            <GradientStop Offset="1.00" Color="#ffff0000"/>
                        </LinearGradientBrush>
                    </c4f:SuperSlider.Foreground>
                    <c4f:SuperSlider.Thumb>
                        <Grid Width="24">
                            <Rectangle 
				            Stroke="Black"
                            StrokeThickness="6" />
                            <Rectangle 
				            Stroke="White"
                            StrokeThickness="3" />
                        </Grid>
                    </c4f:SuperSlider.Thumb>
                </c4f:SuperSlider>
                <c4f:SuperSlider 
					Title="Disabled"
					BarHeight="12"
					Value="2"
					IsEnabled="False" />
            </StackPanel>
            <StackPanel Orientation="Horizontal" Height="500" Grid.Column="1" Margin="20, 0" VerticalAlignment="Top" HorizontalAlignment="Center">
                <c4f:SuperSlider 
					StepFrequency="1"
					Margin="20, 0"
					Padding="0"
					Value="10"
					Minimum="5"
					Maximum="15"
					Orientation="Vertical"/>
                <c4f:SuperSlider 
					Margin="20, 0"
					Padding="0"
					Foreground="Orange"
					Background="CornflowerBlue"
					Orientation="Vertical">
                    <c4f:SuperSlider.Thumb>
                        <Rectangle 
							Fill="Red"
							Height="12"/>
                    </c4f:SuperSlider.Thumb>
                </c4f:SuperSlider>

                <c4f:SuperSlider 
					Margin="20, 0"
					Padding="0"
					BackgroundSize="12"
					ProgressSize="24"
					Foreground="Orange"
					Background="CornflowerBlue"
					Orientation="Vertical">
                    <c4f:SuperSlider.Thumb>
                        <Grid Height="24">
                            <Rectangle 
								Stroke="Black"
								StrokeThickness="6" />
                            <Rectangle 
								Stroke="White"
								StrokeThickness="3" />
                        </Grid>
                    </c4f:SuperSlider.Thumb>
                </c4f:SuperSlider>
                <c4f:SuperSlider 
					Padding="0"
					IsEnabled="False"
					StepFrequency="1"
					Margin="20, 0"
					Value="10"
					Minimum="5"
					Maximum="15"
					Orientation="Vertical"/>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
